import { createRequestTypes } from '@UTILS/reduxHelper'

export const GET_SESSTIONS = createRequestTypes('GET_SESSTIONS')
export const UPDATE_ACTIVE_PATIENT_SESSION = createRequestTypes('UPDATE_ACTIVE_PATIENT_SESSION')
export const GET_SESSTION_BY_ID = createRequestTypes('GET_SESSTION_BY_ID')
export const GET_PATIENT_SYSTEM_MESSAGE = createRequestTypes('GET_PATIENT_SYSTEM_MESSAGE')
export const GET_NEW_BELL_ALERT_NUMBER = createRequestTypes('GET_NEW_BELL_ALERT_NUMBER')
export const GET_BELL_ALERTS = createRequestTypes('GET_BELL_ALERTS')
export const BELL_ALERT_CHANGE = createRequestTypes('BELL_ALERT_CHANGE')
export const SET_TAB_BAR_BADGE = createRequestTypes('SET_TAB_BAR_BADGE')
export const REDUCED_CHAT_NUMBER = createRequestTypes('REDUCED_CHAT_NUMBER')
export const GET_UN_VIEWED_CONSULTATION = createRequestTypes('GET_UN_VIEWED_CONSULTATION')

export default {
  dispatchGetMessageList(payload) {
    return {
      type: GET_SESSTIONS.REQUEST,
      payload
    }
  },
  dispatchGetSessionById(sId, pId, dId) {
    return {
      type: GET_SESSTION_BY_ID.REQUEST,
      sId,
      pId,
      dId
    }
  },
  dispatchGetSystemMessage() {
    return {
      type: GET_PATIENT_SYSTEM_MESSAGE.REQUEST,
    }
  },
  dispatchGetNewBellAlertsNumber() {
    return {
      type: GET_NEW_BELL_ALERT_NUMBER.REQUEST,
    }
  },
  dispatchGetBellAlerts(payload) {
    return {
      type: GET_BELL_ALERTS.REQUEST,
      payload
    }
  },
  dispatchAlertStatusChange(alertId) {
    return {
      type: BELL_ALERT_CHANGE.REQUEST,
      alertId
    }
  },
  dispatchSetTabBarBadge() {
    return {
      type: SET_TAB_BAR_BADGE.REQUEST,
    }
  },
  dispatchGetUnViewedConsultationReport() {
    return {
      type: GET_UN_VIEWED_CONSULTATION.REQUEST,
    }
  },
}
